define('upLoadImg',['common'],function(utils){
	'use strict';

	var upLoadImg = (function(file,suc){
		var formData = new FormData();
		formData.append('pictureFile',file)
		var url = utils.getWebUrl('upload/pic');
		$.ajax({
	        type:"POST",
	        url: url,
	        data: formData,
	        async: true,
	        processData: false,
	        contentType: false,
	        xhrFields: {withCredentials: true},
            crossDomain: true,
	        success:function(res){
	           	if(res.code === "10000"){
	           		suc(res);
	           	}
	        }
	    });
	})
	return upLoadImg;
})
